package kr.ne.jay.SimpleString;

import java.util.Vector;

public class FixedPosConstraint implements IConstraint {
	private int			index;
	private Vector2f	initPos;
	
	public FixedPosConstraint(int _index, Vector2f _initPos) {
		index	= _index;
		initPos = new Vector2f(_initPos.x, _initPos.y);
	}
	
	@Override
	public void calcConstraint(Vector<VerletPoint> points) {
		points.elementAt(index).pos.set(initPos);
	}
}
